package org.cybzacg.convert.converters.numeric;

import org.cybzacg.convert.annotation.Converter;
import org.cybzacg.convert.enums.ConversionPriority;
import org.cybzacg.convert.enums.ConversionType;
import lombok.extern.slf4j.Slf4j;

/**
 * 长整型转换器
 * 
 * <p>
 * 专门处理long和Long类型的转换。
 * 继承自 {@link AbstractNumericConverter}，复用通用数值转换逻辑。
 * 
 * <p>
 * 支持的转换：
 * <ul>
 * <li>Number类型 → Long</li>
 * <li>String → Long</li>
 * <li>Boolean → Long (true=1L, false=0L)</li>
 * <li>Character → Long (字符码)</li>
 * </ul>
 *
 * @author cybzacg.blog
 * @version 4.0
 * @since 3.0
 */
@Slf4j
@Converter(name = "LongConverter", priority = ConversionPriority.HIGH, description = "长整型转换器，专门处理long和Long类型的转换", enabled = true, version = "4.0", author = "cybzacg.blog", supportedTypes = {
        Long.class, long.class }, tags = { "long", "numeric", "basic", "conversion" })
public class LongConverter extends AbstractNumericConverter<Long> {

    /**
     * 构造函数
     */
    public LongConverter() {
        super(Long.class);
    }

    @Override
    protected ConversionType getConversionType() {
        return ConversionType.LONG;
    }
}
